//
//  DetailedAddressCell.m
//  MaiMaiGo
//
//  Created by 孙鹏飞 on 2017/4/11.
//  Copyright © 2017年 qian. All rights reserved.
//

#import "DetailedAddressCell.h"

@interface DetailedAddressCell () <UITextViewDelegate>

@end

@implementation DetailedAddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.inputTextView.delegate = self;
    // 监听文字改变
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textDidChange) name:UITextViewTextDidChangeNotification object:nil];
}

/**
 * 监听文字改变
 */
- (void)textDidChange
 {
     NSLog(@"%d",self.inputTextView.hasText);
     self.placeLabel.hidden = self.inputTextView.hasText;
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
